using System;

namespace SolarDevices.Configuration
{
    public class SolarConfiguration : ISolarConfiguration
    {
        private static ChargeControllerType _chargeController;
        public ChargeControllerType ChargeController
        {
            get
            {
                ChargeControllerType rval;
                lock (this)
                {
                    rval = _chargeController;
                }
                return rval;
            }
            set
            {
                lock (this)
                {
                    _chargeController = value;
                }
            }
        }

        private static InverterType _inverter;
        public InverterType Inverter
        {
            get
            {
                InverterType rval;
                lock (this)
                {
                    rval = _inverter;
                }
                return rval;
            }
            set
            {
                lock (this)
                {
                    _inverter = value;
                }
            }
        }

        private static int _maxPVVoltage = 200;
        public int MaxPVVoltage
        {
            get
            {
                int rval;
                lock (this)
                {
                    rval = _maxPVVoltage;
                }
                return rval;
            }
            set
            {
                lock (this)
                {
                    _maxPVVoltage = value;
                }
            }
        }

        private static int _powerScale = 1;
        public int PowerScale
        {
            get
            {
                int rval;
                lock (this)
                {
                    rval = _powerScale;
                }
                return rval;
            }
            set
            {
                lock (this)
                {
                    _powerScale = value;
                }
            }
        }

        private static int _batteryVoltageScale = 40;
        public int BatteryVoltageScale
        {
            get
            {
                int rval;
                lock (this)
                {
                    rval = _batteryVoltageScale;
                }
                return rval;
            }
            set
            {
                lock (this)
                {
                    _batteryVoltageScale = value;
                }
            }
        }
    }


}